package com.ruoyi.channel.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.channel.mapper.TbWorkTypeMapper;
import com.ruoyi.channel.domain.TbWorkType;
import com.ruoyi.channel.service.ITbWorkTypeService;

/**
 * 招聘类型Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-01-29
 */
@Service
public class TbWorkTypeServiceImpl implements ITbWorkTypeService 
{
    @Autowired
    private TbWorkTypeMapper tbWorkTypeMapper;

    /**
     * 查询招聘类型
     * 
     * @param workTypeId 招聘类型主键
     * @return 招聘类型
     */
    @Override
    public TbWorkType selectTbWorkTypeByWorkTypeId(Long workTypeId)
    {
        return tbWorkTypeMapper.selectTbWorkTypeByWorkTypeId(workTypeId);
    }

    /**
     * 查询招聘类型列表
     * 
     * @param tbWorkType 招聘类型
     * @return 招聘类型
     */
    @Override
    public List<TbWorkType> selectTbWorkTypeList(TbWorkType tbWorkType)
    {
        return tbWorkTypeMapper.selectTbWorkTypeList(tbWorkType);
    }

    /**
     * 新增招聘类型
     * 
     * @param tbWorkType 招聘类型
     * @return 结果
     */
    @Override
    public int insertTbWorkType(TbWorkType tbWorkType)
    {
        tbWorkType.setCreateTime(DateUtils.getNowDate());
        return tbWorkTypeMapper.insertTbWorkType(tbWorkType);
    }

    /**
     * 修改招聘类型
     * 
     * @param tbWorkType 招聘类型
     * @return 结果
     */
    @Override
    public int updateTbWorkType(TbWorkType tbWorkType)
    {
        tbWorkType.setUpdateTime(DateUtils.getNowDate());
        return tbWorkTypeMapper.updateTbWorkType(tbWorkType);
    }

    /**
     * 批量删除招聘类型
     * 
     * @param workTypeIds 需要删除的招聘类型主键
     * @return 结果
     */
    @Override
    public int deleteTbWorkTypeByWorkTypeIds(Long[] workTypeIds)
    {
        return tbWorkTypeMapper.deleteTbWorkTypeByWorkTypeIds(workTypeIds);
    }

    /**
     * 删除招聘类型信息
     * 
     * @param workTypeId 招聘类型主键
     * @return 结果
     */
    @Override
    public int deleteTbWorkTypeByWorkTypeId(Long workTypeId)
    {
        return tbWorkTypeMapper.deleteTbWorkTypeByWorkTypeId(workTypeId);
    }
}
